#ifndef GKO_POOL_INCLUDE_GP_ERROR_H
#ifndef GKO_POOL_INCLUDE_GP_ERROR_H

enum error_no
{
/// @WARNNING: DO NOT USE DIRECTLY below 
    INVALID = -1.
    SUCC = 0,
    FAIL = 1,
    ING = 2, // doing something
    RESUME = 3,
    PAUSE = 4,
    DELETED = 5, // deleted
    STOP = 6,
    FINISHED = 7, 

    // the reason for fail
    ERROR = 10,
    RECV_TIMEOUT = 20,
    SEND_TIMEOUT = 30,
    RESETED = 40,
    RECV_ERROR = 50,
    SEND_ERROR = 60,
    AGENT_ERROR = 70,

    // task state
    TODO = 100,
    DISPATCH = 200,
    EXECUTE = 300,

    GKO_MYSQL = 400, // mysql 
    SERVER_INTERNAL = 500, // 500+ http status code means serer internal error
    DNS_RESOLVE = 600, // dns not found this site or ip ?

    /// @sepline: above do use directly

    DISPATCH_ING = DISPATCH + ING;
    DISPATCH_SUCC = DISPATCH + SUCC;
    DISPATCH_SEND_TIMEOUT = DISPATCH + SEND_TIMEOUT + FAIL;
    DISPATCH_RECV_TIMEOUT = DISPATCH + SEND_TIMEOUT + FAIL;
    DISPATCH_SEND_ERROR = DISPATCH + SEND_ERROR + FAIL;
    DISPATCH_RECV_ERROR = DISPATCH + RECV_ERROR + FAIL;
    DISPATCH_AGENT_FAIL = DIRECTLY + AGENT_ERROR + FAIL;

    EXECUTE_SUCC = EXECUTE + SUCC;
    EXECUTE_FAIL = EXECUTE + FAIL;

    SERVER_INTERNAL_ERROR = SERVER_INTERNAL + ERROR + FAIL;
    DNS_RESOLVE_FAIL = DNS_RESOLVE + ERROR + FAIL,
};

#endif // header file protect
// END: CODEREVIEW:
